package cn.cy.behavior.strategy.pattern;

/**
 * @author yangxq
 * @desc 上下文
 * @date 2025-05-09
 */
public class PaymentContext {

    private PaymentStrategy strategy;

    public void setStrategy(PaymentStrategy strategy) {
        this.strategy = strategy;
    }

    public void executePayment(double amount) {
        strategy.pay(amount);
    }

}
